package com.eujian.eurekaprovider.controller;

import com.eujian.eurekaprovider.feign.ProviderFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping
public class EurekaController {
    @Autowired
    private ProviderFeign providerFeign;

    @GetMapping("/action")
    public String demo(@RequestParam("action")String act){
        return "eureka-provider:"+providerFeign.microFeign(act);
    }

    @GetMapping("/micro/feign")
    public String microFeign(@RequestParam("act")String act){
        return "eureka-provide-microFeign:"+act;
    }
}
